package com.bdmc.smokesensor.dao;
 
import com.bdmc.smokesensor.entity.*;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
//import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.Query;

import java.io.Serializable;
import java.util.List;
 
public interface Rbac_ActionJPA extends JpaRepository<Rbac_Action,Integer>,JpaSpecificationExecutor<Rbac_Action>,Serializable {
  /*
    根据页面id查找按钮
  **/
  public List<Rbac_Action> findByRbacFunctionId(int f_id);

  @Query(value="select a.* from rbac_action a where FIND_IN_SET(a.id,:ids)  ",nativeQuery=true)
  public List<Rbac_Action> getRoleActions(String ids);
}
